/**
 * This file is part of Idegen, the application to create IDE project files.
 *
 * @copyright Copyright (c) 2011-2012, Walter Tamboer http://waltertamboer.nl
 * @file Idegen/Generator/GeneratorType.cpp
 */

#ifndef IDEGEN_IDEGEN_IDEGENPROJECTTYPE_HPP
#define IDEGEN_IDEGEN_IDEGENPROJECTTYPE_HPP

namespace Idegen
{
	/** An enumeration containing all project types that Idegen supports. */
	enum IdegenProjectType
	{
		/** An unknown project type. */
		IdegenProjectTypeUnknown,

		/** A dynamic library. */
		IdegenProjectTypeDynamicLibrary,

		/** A static library. */
		IdegenProjectTypeStaticLibrary,
		
		/** An executable. */
		IdegenProjectTypeExecutable,
	};

	/**
	 * Converts the given string to the project type.
	 *
	 * @param[in] type The string to convert.
	 * @return Returns a IdegenProjectType value.
	 */
	inline IdegenProjectType StringToProjectType( const std::string& type )
	{
		IdegenProjectType result = IdegenProjectTypeUnknown;
		
		if ( type == "dynamic" )
		{
			result = IdegenProjectTypeDynamicLibrary;
		}
		else if ( type == "executable" )
		{
			result = IdegenProjectTypeExecutable;
		}
		else if ( type == "static" )
		{
			result = IdegenProjectTypeStaticLibrary;
		}

		return result;
	}
}

#endif
